package Assignment;

import java.util.Scanner;

public class Test7 {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        System.out.println("键盘录入一个三位数:");
        int number = sc.nextInt();


        int ge = number % 10;  //个位
        int shi = number / 10 % 10;  //十位
        int bai = number / 100 % 10;  //百位

        //求和
        int sum = ge +shi +bai;
        System.out.println(sum);
    }
}
